package com.fenghao.subject.application.convert;

import com.fenghao.subject.application.dto.SubjectInfoDTO;
import com.fenghao.subject.domain.entity.SubjectInfoBO;
import org.mapstruct.Mapper;
import org.mapstruct.factory.Mappers;

import java.util.List;

/**
 * SubjectInfoDTO ——> SubjectInfoBO (Bean转换)
 * List<SubjectInfoBO> ——> List<SubjectInfoDTO> (BeanList转换)
 */
@Mapper
public interface SubjectInfoDtoConvert {

    SubjectInfoDtoConvert INSTANCE = Mappers.getMapper(SubjectInfoDtoConvert.class);

    SubjectInfoBO convertDtoToBo(SubjectInfoDTO subjectInfoDTO);

    List<SubjectInfoDTO> convertBoListToDtoList(List<SubjectInfoBO> subjectInfoBOList);
}
